package com.interview.generator.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.interview.common.domain.model.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.util.Date;
import java.util.List;

/**
 * 代码生成业务表实体类
 *
 * @author zzw
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("gen_table")
@Schema(description = "代码生成业务表")
public class GenTable extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "编号")
    @TableId
    private Long tableId;

    @Schema(description = "表名称")
    private String tableName;

    @Schema(description = "实体类名称")
    private String className;

    @Schema(description = "表描述")
    private String tableComment;

    @Schema(description = "关联子表的表名")
    private String subTableName;

    @Schema(description = "子表关联外键")
    private String subTableFk;

    @Schema(description = "模板类型（crud单表 tree树形）")
    private String tplCategory;

    @Schema(description = "模板类型")
    private String tplWebType;

    @Schema(description = "生成包路径")
    private String packageName;

    @Schema(description = "生成模块名")
    private String moduleName;

    @Schema(description = "生成功能名")
    private String businessName;

    @Schema(description = "生成作者")
    private String functionAuthor;

    @Schema(description = "生成方式（0zip压缩包 1自定义路径）")
    private String genType;

    @Schema(description = "生成路径")
    private String genPath;

    @Schema(description = "其它生成选项")
    private String options;

    @Schema(description = "状态（0正常 1停用）")
    private String status;

    @Schema(description = "表列信息")
    @TableField(exist = false)
    private List<GenTableColumn> columns;
}

